VERSION 1.0 CLASS
BEGIN
  MultiUse = -1  'True
  Persistable = 0  'NotPersistable
  DataBindingBehavior = 0  'vbNone
  DataSourceBehavior  = 0  'vbNone
  MTSTransactionMode  = 0  'NotAnMTSObject
END
Attribute VB_Name = "DAODestino"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = True
Attribute VB_PredeclaredId = False
Attribute VB_Exposed = False
'---------------------------------------------------------------------------------------
' Module    : DAODestino
' DateTime  : 03/12/2011 16:37
' Author    :
' Purpose   : Clase DAO Destino
'---------------------------------------------------------------------------------------
Option Explicit
Private mvarConnection As utilConexion
Public Property Set Connection(ByVal vData As utilConexion)
    Set mvarConnection = vData
End Property
Public Function getLista(bean As bdestino) As Collection
On Error GoTo hnderr
Dim sql As String
Dim rst As New Recordset
Dim list As New Collection
Dim record As New bdestino
sql = "SELECT ncodigo , sdescripcion , snomimpresora "
sql = sql + "FROM proc_destino_lista()"
rst.Open sql, mvarConnection.Connection, adOpenForwardOnly
While Not rst.EOF
    Set record = New bdestino
    If Not IsNull(rst.Fields("ncodigo")) Then record.ncodigodestino = rst.Fields("ncodigo").value
    If Not IsNull(rst.Fields("sdescripcion")) Then record.sdescripcion = rst.Fields("sdescripcion").value
    If Not IsNull(rst.Fields("snomimpresora")) Then record.snombreimpresora = rst.Fields("snomimpresora").value
    rst.MoveNext
    list.Add record
Wend
Set getLista = list
hnderr:
If Err.Number = 0 Then Exit Function
cloneError Err
End Function
